<template>
  <div class="app-container">
    <vxe-table
      ref="table"
      border="inner"
      size="mini"
      :data="tableData"
    >
      <vxe-table-column field="assignee" title="审批节点" />
      <vxe-table-column field="startTime" title="审批时间" />
      <vxe-table-column field="comment" title="审批意见" />
    </vxe-table>
  </div>
</template>
<script>
import { taskHistorical } from '@/api/activiti/task'
export default {
  props: {
    value: {
      type: Object,
      default: () => Object.create({})
    }
  },
  data() {
    return {
      loading: false,
      tableData: []
    }
  },
  created() {
    this.onSearchBtnClick(this.value.instanceId)
  },
  methods: {
    onSearchBtnClick(id) {
      this.loading = false
      taskHistorical(id).then((data) => {
        this.tableData = data
        this.loading = false
      })
    }
  }
}
</script>
